﻿ 
 

// ******************************************************
// 这段代码是自动生成的
// 修改里面的代码，下次生成的时候会被覆盖
// ******************************************************
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Diagnostics;
using System.ServiceModel;
using Sharp.Application;
using Sharp.DataTransferObject;
using System.ServiceModel.Activation;
using Sharp.Infrastructure.Search;
using Sharp.ServiceContracts;
using Sharp.Infrastructure;
using Sharp.Infrastructure.Interfaces;
using Sharp.Infrastructure.IoC;
namespace Sharp.Services
{
	[DebuggerStepThrough]
	[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
	[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple, UseSynchronizationContext = false)]
	public class EnterpriseService : IEnterpriseService
	{
		private readonly IEnterpriseService _impl = ServiceLocator.Instance.GetService<IEnterpriseService>();
				public Result SaveEmployee(EmployeeDTO model)
		{
			try
			{
				return _impl.SaveEmployee(model);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public Result DeleteEmployee(Guid[] ids)
		{
			try
			{
				return _impl.DeleteEmployee(ids);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public EmployeeDTO GetEmployeeInfo(Guid id)
		{
			try
			{
				return _impl.GetEmployeeInfo(id);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public PagedResult<EmployeeDTO> GetEmployeePaged(PagingFeature pf)
		{
			try
			{
				return _impl.GetEmployeePaged(pf);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public IEnumerable<EmployeeDTO> GetEmployeesInOrg(Guid[] orgIds)
		{
			try
			{
				return _impl.GetEmployeesInOrg(orgIds);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public Result SaveJob(JobDTO model)
		{
			try
			{
				return _impl.SaveJob(model);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public Result DeleteJob(Guid[] ids)
		{
			try
			{
				return _impl.DeleteJob(ids);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public JobDTO GetJobInfo(Guid id)
		{
			try
			{
				return _impl.GetJobInfo(id);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public PagedResult<JobDTO> GetJobPaged(PagingFeature pf)
		{
			try
			{
				return _impl.GetJobPaged(pf);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public Result SaveOrg(OrgDTO model)
		{
			try
			{
				return _impl.SaveOrg(model);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public Result DeleteOrgs(Guid[] ids)
		{
			try
			{
				return _impl.DeleteOrgs(ids);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public OrgDTO GetOrgInfo(Guid id)
		{
			try
			{
				return _impl.GetOrgInfo(id);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public IEnumerable<OrgDTO> GetOrgs()
		{
			try
			{
				return _impl.GetOrgs();
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public Result OrgMoveOrSort(System.Nullable<System.Guid> parentId, Guid[] ids)
		{
			try
			{
				return _impl.OrgMoveOrSort(parentId, ids);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public IEnumerable<OrgLevelDTO> GetOrgLevelList()
		{
			try
			{
				return _impl.GetOrgLevelList();
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public Result SaveGroup(GroupDTO model)
		{
			try
			{
				return _impl.SaveGroup(model);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public Result DeleteGroups(Guid[] ids)
		{
			try
			{
				return _impl.DeleteGroups(ids);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public GroupDTO GetGroupInfo(Guid id)
		{
			try
			{
				return _impl.GetGroupInfo(id);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
		public PagedResult<GroupDTO> GetGroupPaged(PagingFeature pf)
		{
			try
			{
				return _impl.GetGroupPaged(pf);
			}
			catch(Exception ex)
			{
				throw new FaultException<FaultData>(FaultData.CreateFromException(ex), FaultData.CreateFaultReason(ex));
			}
		}
	}
}